public class text3 {
    public static void main(String[] args) {
        MainBoard mb = new MainBoard();
        NetworkCard nc = new NetworkCard();
        SoundCard sc = new SoundCard();
        mb.usePCICard(nc); // 启动网卡
        mb.usePCICard(sc); // 启动声卡
    }
}
interface PCI {
    public abstract void start();
    public abstract void stop();
}
class NetworkCard implements PCI {
    @Override
    public void start() {
        System.out.println("sending date......");
    }
    @Override
    public void stop() {
        System.out.println("network stop");
    }
}
class SoundCard implements PCI{
    @Override
    public void start() {
        System.out.println("dudu......");
    }
    @Override
    public void stop() {
        System.out.println("sound stop");
    }
}

class MainBoard {
    public void usePCICard(PCI p) {
        p.start();
        p.stop();
    }
}